In the Internet technology, a domain name system provides a service of mapping between a domain name for facilitating memorization and an IP address used by a computer.
A recursive query process in a domain name system in the prior art is: first, a terminal device sends a domain name system (Domain Name System, DNS for short) packet to a recursive server, and then the recursive server queries an authority server A; if the authority server A has relevant records, namely, stores the IP address corresponding to the queried domain name, the authority server A sends the relevant records to the recursive server, and the recursive server sends the relevant records to the terminal device that initiates the query. If the authority server A does not store the IP address corresponding to the queried domain name, and determines that authority server B may probably store the relevant records of the foregoing domain name, authority server A returns an answer recommending the recursive server to query the authority server B. In this way, the recursive server forwards the request for the DNS query to the authority server B. The authority server B performs the same query step as the authority server A. If the authority server B stores the IP address corresponding to the queried domain name, the authority server B sends the relevant records to the recursive server, and the recursive server sends the relevant records to the terminal device that initiates the query; if the authority server B does not store the IP address corresponding to the queried domain name, and determines that an authority server C may probably store the relevant records of the foregoing domain name, the authority server B returns an answer recommending the recursive server to query authority server C. In this way, the recursive server forwards the DNS query request to the authority server C. The foregoing process goes on until an authority server that stores the IP address corresponding to the queried domain name returns the query result to the recursive server, and the recursive server sends the query result to the terminal device that initiates the DNS query. Besides, if none of the authority servers stores the IP address corresponding to the query domain name, the queried authority servers will finally send an answer indicating nonexistence of the domain name to the recursive server, and the recursive server returns the answer to the terminal device that initiates the query.
In the foregoing recursive query process, the recursive server queries the IP address corresponding to the domain name in place of the terminal device. Specifically, when the terminal device initiates the DNS query to the recursive server, IP packet header information of the IP packet sent by the terminal device includes the IP address information of the query host itself. As shown in FIG. 1, however, when the recursive server initiates query to the authority server, the IP packet header of the IP packet sent by the recursive server includes the IP address of the recursive server. In the process of developing the present invention, the inventor finds at least these problems in the prior art: without knowing information about the terminal device that queries the domain name information, the prior art is unable to control or statisticize the terminal device's actions of querying the domain name information.